﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="EditCar.aspx.cs" Inherits="CarRental.View.Car.EditCar" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <link rel="stylesheet" type="text/css" href="../../js/My97DatePicker/skin/WdatePicker.css" />
    <link href="../../js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="../../js/My97DatePicker/WdatePicker.js" charset="gb2312"></script>
    <form runat="server" id="EditCarForm">
        <fieldset>
            <legend>Edit Car Form</legend>
            <ol>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbCarNo">Car No</asp:Label>
                    <asp:TextBox runat="server" ID="tbCarNo" Enabled="False" />
                    <asp:Label ID="lblWarning" runat="server" Text="" ForeColor="Red"></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbCarNo"
                        CssClass="field-validation-error" ErrorMessage="The Car No is required." />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbCarModel">Car Model</asp:Label>
                    <asp:TextBox runat="server" ID="tbCarModel" Enabled="False" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbCarModel"
                        CssClass="field-validation-error" ErrorMessage="The Car Model is required." />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbTonnage">Tonnage</asp:Label>
                    <asp:TextBox runat="server" ID="tbTonnage" Enabled="False" />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlDepot">Depot</asp:Label>
                    <asp:DropDownList ID="ddlDepot" runat="server" Width="200px" Height="25px" Enabled="False"></asp:DropDownList>
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlDrivetrains">Drivetrains</asp:Label>
                    <asp:DropDownList ID="ddlDrivetrains" runat="server" Width="200px" Height="25px" Enabled="False"></asp:DropDownList>
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlColor">Color</asp:Label>
                    <asp:DropDownList ID="ddlColor" runat="server" Width="200px" Height="25px" Enabled="False"></asp:DropDownList>
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlCarType">Car Type</asp:Label>
                    <asp:DropDownList ID="ddlCarType" runat="server" Width="200px" Height="25px" Enabled="False"></asp:DropDownList>
                </li>
                <li>
                    <li>
                        <asp:Label ID="lblBuyInDate" runat="server" AssociatedControlID="tbBuyInDate">Car Buy in Date</asp:Label>
                        <asp:TextBox ID="tbBuyInDate" onclick="WdatePicker();" runat="server" Width="200px" Height="25px"></asp:TextBox>
                    </li>
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbBuyinCost">Car Buy in Cost</asp:Label>
                    <asp:TextBox runat="server" ID="tbBuyinCost" TextMode="Number" Enabled="False" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbBuyinCost"
                        CssClass="field-validation-error" ErrorMessage="The Car Buy in Cost is required." />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbRentPrice">Car rent price</asp:Label>
                    <asp:TextBox runat="server" ID="tbRentPrice" TextMode="Number" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbRentPrice"
                        CssClass="field-validation-error" ErrorMessage="The Car rent price is required." />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbLicense">License No</asp:Label>
                    <asp:TextBox runat="server" ID="tbLicense" Enabled="False" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="tbLicense"
                        CssClass="field-validation-error" ErrorMessage="The License No is required." />
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="ddlShop">Shop</asp:Label>
                    <asp:DropDownList ID="ddlShop" runat="server" Width="200px" Height="25px"></asp:DropDownList>
                </li>
                <li>
                    <asp:Label runat="server" AssociatedControlID="tbLastRentOrderNo">Last Rent Order Number</asp:Label>
                    <asp:TextBox runat="server" ID="tbLastRentOrderNo" TextMode="SingleLine" Enabled="False" />
                </li>
            </ol>
            <asp:Button runat="server" ID="btnEditCar" Text="Update Car" OnClick="btnEditCar_Click" />
            <asp:Button runat="server" ID="btnDetele" Text="Delete Car" OnClientClick="return confirm('Are you sure?');" OnClick="btnDetele_Click" />
            <asp:Button ID="btnBack" runat="server" Text="Back" OnClick="btnBack_Click" />
        </fieldset>
    </form>
</asp:Content>
